package cn.dface.app.deploy.entity;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;

@XmlEnum
public enum StatusType {
	
	@XmlEnumValue("Published")
	PUBLISHED("Published"),
	@XmlEnumValue("Unpublished")
	UNPUBLISHED("Unpublished");
	
	String value;
	
	private StatusType(String value) {
		this.value = value;
	}
	
	public String getValue() {
		return value;
	}
	
	@Override
	public String toString() {
		return value;
	}
	
	public static StatusType fromValue(String value) {
		for (StatusType status : StatusType.values()) {
			if (value.equals(status.value)) {
				return status;
			}
		}
		return null;
	}
}
